<template>
	<view class="table-box">
		<table class="view-table">
			<thead>
				<tr>
					<th>序号</th>
					<th>指标项</th>
					<th>描述</th>
					<th>分值</th>
				</tr>
			</thead>
			<tbody>
				<tr v-for="(item,index) in list" :key="index">
					<td>{{index+1}}</td>
					<td class="col2">{{item.indicatorItem}}</td>
					<td>{{item.indicatorDesc}}</td>
					<td>{{item.itemScore}}</td>
				</tr>
			</tbody>
		</table>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad(e) {
			const param = JSON.parse(e.param);
			this.$api.companyAssessDetail({
				archiveId: param.archiveId,
				evalSection: param.evalSection,
				period: param.period,
				key: param.key,
				code: param.code,
			}).then(res => {
				this.list = res.data.data.assArchiveDetailList;
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.table-box {
		background: #fff;
		min-height: 100vh;
		padding: 26rpx 20rpx;
		box-sizing: border-box;
	}

	.view-table {
		width: 100%;
		border-collapse: collapse;

		th,
		td {
			border: 1px solid #B5B9CD;
			font-size: 28rpx;
			text-align: center;
			padding: 18rpx 16rpx;
		}

		th {
			line-height: 36rpx;
			color: #333;
			background: #EBEDF2;
			white-space: nowrap;
		}

		td {
			line-height: 34rpx;
			color: #343434;

			&.col2 {
				width: 5em;
			}
		}
	}
</style>
